package com.weimob.mcloud.wechatwork.customer.mq;

import com.weimob.mcloud.wechatwork.core.entity.privatesphere.PrivateSphere;
import com.weimob.mcloud.wechatwork.core.service.group.request.CustomerGroupMemberDTO;
import com.weimob.mcloud.wechatwork.customer.mq.model.JoinGroupMsgModel;

/**
 * @author chenliuzhu
 * @date 2023/1/31
 */
public class JoinGroupMsgConvert {

    public static void convertJoinGroupMsgModel(CustomerGroupMemberDTO memberDTO, Long wid, JoinGroupMsgModel joinGroupMsgModel, PrivateSphere privateSphere) {
        joinGroupMsgModel.setBosId(privateSphere.getBosId());
        joinGroupMsgModel.setWid(wid);
        joinGroupMsgModel.setState(memberDTO.getState());
        joinGroupMsgModel.setGroupId(memberDTO.getGroupId());
        joinGroupMsgModel.setMemberId(memberDTO.getMemberId());
        joinGroupMsgModel.setType(memberDTO.getType());
        joinGroupMsgModel.setJoinTime(memberDTO.getJoinTime());
        joinGroupMsgModel.setJoinScene(memberDTO.getJoinScene());
        joinGroupMsgModel.setNickname(memberDTO.getNickname());
        joinGroupMsgModel.setGroupNickname(memberDTO.getGroupNickname());
        joinGroupMsgModel.setInvitorOrgUserid(memberDTO.getInvitorOrgUserid());
    }
}
